#ifndef __cplusplus
#include "stdlib.h"
#endif
#include "string.h"

#include "tolua++.h"

/* Exported function */
TOLUA_API int  tolua_luaComplex_open (lua_State* tolua_S);

#include   "./../luaComplexEx.h"
#include "./../luaComplex.h"

/* function to release collected object via destructor */
#ifdef __cplusplus

static int tolua_collect_std__complex_double_ (lua_State* tolua_S)
{
 std::complex<double>* self = (std::complex<double>*) tolua_tousertype(tolua_S,1,0);
	Mtolua_delete(self);
	return 0;
}

static int tolua_collect_std__complex_float_ (lua_State* tolua_S)
{
 std::complex<float>* self = (std::complex<float>*) tolua_tousertype(tolua_S,1,0);
	Mtolua_delete(self);
	return 0;
}
#endif


/* function to register type */
static void tolua_reg_types (lua_State* tolua_S)
{
 tolua_usertype(tolua_S,"std::complex<double>");
 tolua_usertype(tolua_S,"std::complex<float>");
}

/* method: new of class  std::complex<double> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_new00
static int tolua_luaComplex_std_complex_new00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"std::complex<double>",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  {
   std::complex<double>* tolua_ret = (std::complex<double>*)  Mtolua_new((std::complex<double>)());
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::complex<double>");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: new_local of class  std::complex<double> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_new00_local
static int tolua_luaComplex_std_complex_new00_local(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"std::complex<double>",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  {
   std::complex<double>* tolua_ret = (std::complex<double>*)  Mtolua_new((std::complex<double>)());
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::complex<double>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: new of class  std::complex<double> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_new01
static int tolua_luaComplex_std_complex_new01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"std::complex<double>",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const double tolua_var_1 = ((const double)  tolua_tonumber(tolua_S,2,0));
  {
   std::complex<double>* tolua_ret = (std::complex<double>*)  Mtolua_new((std::complex<double>)(tolua_var_1));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::complex<double>");
   tolua_pushnumber(tolua_S,(lua_Number)tolua_var_1);
  }
 }
 return 2;
tolua_lerror:
 return tolua_luaComplex_std_complex_new00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new_local of class  std::complex<double> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_new01_local
static int tolua_luaComplex_std_complex_new01_local(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"std::complex<double>",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const double tolua_var_1 = ((const double)  tolua_tonumber(tolua_S,2,0));
  {
   std::complex<double>* tolua_ret = (std::complex<double>*)  Mtolua_new((std::complex<double>)(tolua_var_1));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::complex<double>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
   tolua_pushnumber(tolua_S,(lua_Number)tolua_var_1);
  }
 }
 return 2;
tolua_lerror:
 return tolua_luaComplex_std_complex_new00_local(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new of class  std::complex<double> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_new02
static int tolua_luaComplex_std_complex_new02(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"std::complex<double>",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const std::complex<double>",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const std::complex<double>* tolua_var_2 = ((const std::complex<double>*)  tolua_tousertype(tolua_S,2,0));
  {
   std::complex<double>* tolua_ret = (std::complex<double>*)  Mtolua_new((std::complex<double>)(*tolua_var_2));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::complex<double>");
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaComplex_std_complex_new01(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new_local of class  std::complex<double> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_new02_local
static int tolua_luaComplex_std_complex_new02_local(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"std::complex<double>",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const std::complex<double>",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const std::complex<double>* tolua_var_2 = ((const std::complex<double>*)  tolua_tousertype(tolua_S,2,0));
  {
   std::complex<double>* tolua_ret = (std::complex<double>*)  Mtolua_new((std::complex<double>)(*tolua_var_2));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::complex<double>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaComplex_std_complex_new01_local(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new of class  std::complex<double> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_new03
static int tolua_luaComplex_std_complex_new03(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"std::complex<double>",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  double re = ((double)  tolua_tonumber(tolua_S,2,0));
  double im = ((double)  tolua_tonumber(tolua_S,3,0));
  {
   std::complex<double>* tolua_ret = (std::complex<double>*)  Mtolua_new((std::complex<double>)(re,im));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::complex<double>");
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaComplex_std_complex_new02(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new_local of class  std::complex<double> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_new03_local
static int tolua_luaComplex_std_complex_new03_local(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"std::complex<double>",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  double re = ((double)  tolua_tonumber(tolua_S,2,0));
  double im = ((double)  tolua_tonumber(tolua_S,3,0));
  {
   std::complex<double>* tolua_ret = (std::complex<double>*)  Mtolua_new((std::complex<double>)(re,im));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::complex<double>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaComplex_std_complex_new02_local(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: real of class  std::complex<double> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_real00
static int tolua_luaComplex_std_complex_real00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const std::complex<double>",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const std::complex<double>* self = (const std::complex<double>*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'real'", NULL);
#endif
  {
   const double tolua_ret = (const double)  self->real();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'real'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: imag of class  std::complex<double> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_imag00
static int tolua_luaComplex_std_complex_imag00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const std::complex<double>",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const std::complex<double>* self = (const std::complex<double>*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'imag'", NULL);
#endif
  {
   const double tolua_ret = (const double)  self->imag();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'imag'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: real of class  std::complex<double> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_real01
static int tolua_luaComplex_std_complex_real01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"std::complex<double>",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  std::complex<double>* self = (std::complex<double>*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'real'", NULL);
#endif
  {
   double tolua_ret = (double)  self->real();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaComplex_std_complex_real00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: imag of class  std::complex<double> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_imag01
static int tolua_luaComplex_std_complex_imag01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"std::complex<double>",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  std::complex<double>* self = (std::complex<double>*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'imag'", NULL);
#endif
  {
   double tolua_ret = (double)  self->imag();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaComplex_std_complex_imag00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: complex_abs of class  std::complex<double> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_abs00
static int tolua_luaComplex_std_complex_abs00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"std::complex<double>",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  std::complex<double>* self = (std::complex<double>*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'complex_abs'", NULL);
#endif
  {
   tolua_outside double tolua_ret = (tolua_outside double)  complex_abs(self);
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'abs'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: complex_arg of class  std::complex<double> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_arg00
static int tolua_luaComplex_std_complex_arg00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"std::complex<double>",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  std::complex<double>* self = (std::complex<double>*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'complex_arg'", NULL);
#endif
  {
   tolua_outside double tolua_ret = (tolua_outside double)  complex_arg(self);
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'arg'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: add of class  std::complex<double> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex__add00
static int tolua_luaComplex_std_complex__add00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"std::complex<double>",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const std::complex<double>",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  std::complex<double>* self = (std::complex<double>*)  tolua_tousertype(tolua_S,1,0);
  const std::complex<double>* tolua_var_3 = ((const std::complex<double>*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'add'", NULL);
#endif
  {
   tolua_outside std::complex<double> tolua_ret = (tolua_outside std::complex<double>)  add(self,*tolua_var_3);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((std::complex<double>)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<double>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::complex<double>));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<double>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function '.add'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: sub of class  std::complex<double> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex__sub00
static int tolua_luaComplex_std_complex__sub00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"std::complex<double>",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const std::complex<double>",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  std::complex<double>* self = (std::complex<double>*)  tolua_tousertype(tolua_S,1,0);
  const std::complex<double>* tolua_var_4 = ((const std::complex<double>*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'sub'", NULL);
#endif
  {
   tolua_outside std::complex<double> tolua_ret = (tolua_outside std::complex<double>)  sub(self,*tolua_var_4);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((std::complex<double>)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<double>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::complex<double>));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<double>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function '.sub'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: mul of class  std::complex<double> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex__mul00
static int tolua_luaComplex_std_complex__mul00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"std::complex<double>",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const std::complex<double>",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  std::complex<double>* self = (std::complex<double>*)  tolua_tousertype(tolua_S,1,0);
  const std::complex<double>* tolua_var_5 = ((const std::complex<double>*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'mul'", NULL);
#endif
  {
   tolua_outside std::complex<double> tolua_ret = (tolua_outside std::complex<double>)  mul(self,*tolua_var_5);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((std::complex<double>)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<double>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::complex<double>));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<double>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function '.mul'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: div of class  std::complex<double> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex__div00
static int tolua_luaComplex_std_complex__div00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"std::complex<double>",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const std::complex<double>",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  std::complex<double>* self = (std::complex<double>*)  tolua_tousertype(tolua_S,1,0);
  const std::complex<double>* tolua_var_6 = ((const std::complex<double>*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'div'", NULL);
#endif
  {
   tolua_outside std::complex<double> tolua_ret = (tolua_outside std::complex<double>)  div(self,*tolua_var_6);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((std::complex<double>)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<double>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::complex<double>));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<double>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function '.div'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: add of class  std::complex<double> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex__add01
static int tolua_luaComplex_std_complex__add01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"std::complex<double>",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  std::complex<double>* self = (std::complex<double>*)  tolua_tousertype(tolua_S,1,0);
  const double tolua_var_7 = ((const double)  tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'add'", NULL);
#endif
  {
   tolua_outside std::complex<double> tolua_ret = (tolua_outside std::complex<double>)  add(self,tolua_var_7);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((std::complex<double>)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<double>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::complex<double>));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<double>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
   tolua_pushnumber(tolua_S,(lua_Number)tolua_var_7);
  }
 }
 return 2;
tolua_lerror:
 return tolua_luaComplex_std_complex__add00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: sub of class  std::complex<double> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex__sub01
static int tolua_luaComplex_std_complex__sub01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"std::complex<double>",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  std::complex<double>* self = (std::complex<double>*)  tolua_tousertype(tolua_S,1,0);
  const double tolua_var_8 = ((const double)  tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'sub'", NULL);
#endif
  {
   tolua_outside std::complex<double> tolua_ret = (tolua_outside std::complex<double>)  sub(self,tolua_var_8);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((std::complex<double>)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<double>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::complex<double>));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<double>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
   tolua_pushnumber(tolua_S,(lua_Number)tolua_var_8);
  }
 }
 return 2;
tolua_lerror:
 return tolua_luaComplex_std_complex__sub00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: mul of class  std::complex<double> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex__mul01
static int tolua_luaComplex_std_complex__mul01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"std::complex<double>",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  std::complex<double>* self = (std::complex<double>*)  tolua_tousertype(tolua_S,1,0);
  const double tolua_var_9 = ((const double)  tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'mul'", NULL);
#endif
  {
   tolua_outside std::complex<double> tolua_ret = (tolua_outside std::complex<double>)  mul(self,tolua_var_9);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((std::complex<double>)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<double>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::complex<double>));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<double>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
   tolua_pushnumber(tolua_S,(lua_Number)tolua_var_9);
  }
 }
 return 2;
tolua_lerror:
 return tolua_luaComplex_std_complex__mul00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: div of class  std::complex<double> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex__div01
static int tolua_luaComplex_std_complex__div01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"std::complex<double>",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  std::complex<double>* self = (std::complex<double>*)  tolua_tousertype(tolua_S,1,0);
  const double tolua_var_10 = ((const double)  tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'div'", NULL);
#endif
  {
   tolua_outside std::complex<double> tolua_ret = (tolua_outside std::complex<double>)  div(self,tolua_var_10);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((std::complex<double>)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<double>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::complex<double>));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<double>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
   tolua_pushnumber(tolua_S,(lua_Number)tolua_var_10);
  }
 }
 return 2;
tolua_lerror:
 return tolua_luaComplex_std_complex__div00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: add of class  std::complex<double> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex__add02
static int tolua_luaComplex_std_complex__add02(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"std::complex<double>",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  std::complex<double>* self = (std::complex<double>*)  tolua_tousertype(tolua_S,1,0);
  const double tolua_var_11 = ((const double)  tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'add'", NULL);
#endif
  {
   tolua_outside std::complex<double> tolua_ret = (tolua_outside std::complex<double>)  add(self,tolua_var_11);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((std::complex<double>)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<double>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::complex<double>));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<double>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
   tolua_pushnumber(tolua_S,(lua_Number)tolua_var_11);
  }
 }
 return 2;
tolua_lerror:
 return tolua_luaComplex_std_complex__add01(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: sub of class  std::complex<double> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex__sub02
static int tolua_luaComplex_std_complex__sub02(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"std::complex<double>",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  std::complex<double>* self = (std::complex<double>*)  tolua_tousertype(tolua_S,1,0);
  const double tolua_var_12 = ((const double)  tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'sub'", NULL);
#endif
  {
   tolua_outside std::complex<double> tolua_ret = (tolua_outside std::complex<double>)  sub(self,tolua_var_12);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((std::complex<double>)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<double>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::complex<double>));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<double>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
   tolua_pushnumber(tolua_S,(lua_Number)tolua_var_12);
  }
 }
 return 2;
tolua_lerror:
 return tolua_luaComplex_std_complex__sub01(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: mul of class  std::complex<double> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex__mul02
static int tolua_luaComplex_std_complex__mul02(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"std::complex<double>",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  std::complex<double>* self = (std::complex<double>*)  tolua_tousertype(tolua_S,1,0);
  const double tolua_var_13 = ((const double)  tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'mul'", NULL);
#endif
  {
   tolua_outside std::complex<double> tolua_ret = (tolua_outside std::complex<double>)  mul(self,tolua_var_13);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((std::complex<double>)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<double>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::complex<double>));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<double>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
   tolua_pushnumber(tolua_S,(lua_Number)tolua_var_13);
  }
 }
 return 2;
tolua_lerror:
 return tolua_luaComplex_std_complex__mul01(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: div of class  std::complex<double> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex__div02
static int tolua_luaComplex_std_complex__div02(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"std::complex<double>",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  std::complex<double>* self = (std::complex<double>*)  tolua_tousertype(tolua_S,1,0);
  const double tolua_var_14 = ((const double)  tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'div'", NULL);
#endif
  {
   tolua_outside std::complex<double> tolua_ret = (tolua_outside std::complex<double>)  div(self,tolua_var_14);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((std::complex<double>)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<double>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::complex<double>));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<double>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
   tolua_pushnumber(tolua_S,(lua_Number)tolua_var_14);
  }
 }
 return 2;
tolua_lerror:
 return tolua_luaComplex_std_complex__div01(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new of class  std::complex<float> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_float__new00
static int tolua_luaComplex_std_complex_float__new00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"std::complex<float>",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  {
   std::complex<float>* tolua_ret = (std::complex<float>*)  Mtolua_new((std::complex<float>)());
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::complex<float>");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: new_local of class  std::complex<float> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_float__new00_local
static int tolua_luaComplex_std_complex_float__new00_local(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"std::complex<float>",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  {
   std::complex<float>* tolua_ret = (std::complex<float>*)  Mtolua_new((std::complex<float>)());
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::complex<float>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: new of class  std::complex<float> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_float__new01
static int tolua_luaComplex_std_complex_float__new01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"std::complex<float>",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const float tolua_var_15 = ((const float)  tolua_tonumber(tolua_S,2,0));
  {
   std::complex<float>* tolua_ret = (std::complex<float>*)  Mtolua_new((std::complex<float>)(tolua_var_15));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::complex<float>");
   tolua_pushnumber(tolua_S,(lua_Number)tolua_var_15);
  }
 }
 return 2;
tolua_lerror:
 return tolua_luaComplex_std_complex_float__new00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new_local of class  std::complex<float> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_float__new01_local
static int tolua_luaComplex_std_complex_float__new01_local(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"std::complex<float>",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const float tolua_var_15 = ((const float)  tolua_tonumber(tolua_S,2,0));
  {
   std::complex<float>* tolua_ret = (std::complex<float>*)  Mtolua_new((std::complex<float>)(tolua_var_15));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::complex<float>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
   tolua_pushnumber(tolua_S,(lua_Number)tolua_var_15);
  }
 }
 return 2;
tolua_lerror:
 return tolua_luaComplex_std_complex_float__new00_local(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new of class  std::complex<float> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_float__new02
static int tolua_luaComplex_std_complex_float__new02(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"std::complex<float>",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const std::complex<float>",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const std::complex<float>* tolua_var_16 = ((const std::complex<float>*)  tolua_tousertype(tolua_S,2,0));
  {
   std::complex<float>* tolua_ret = (std::complex<float>*)  Mtolua_new((std::complex<float>)(*tolua_var_16));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::complex<float>");
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaComplex_std_complex_float__new01(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new_local of class  std::complex<float> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_float__new02_local
static int tolua_luaComplex_std_complex_float__new02_local(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"std::complex<float>",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const std::complex<float>",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const std::complex<float>* tolua_var_16 = ((const std::complex<float>*)  tolua_tousertype(tolua_S,2,0));
  {
   std::complex<float>* tolua_ret = (std::complex<float>*)  Mtolua_new((std::complex<float>)(*tolua_var_16));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::complex<float>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaComplex_std_complex_float__new01_local(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new of class  std::complex<float> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_float__new03
static int tolua_luaComplex_std_complex_float__new03(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"std::complex<float>",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  float re = ((float)  tolua_tonumber(tolua_S,2,0));
  float im = ((float)  tolua_tonumber(tolua_S,3,0));
  {
   std::complex<float>* tolua_ret = (std::complex<float>*)  Mtolua_new((std::complex<float>)(re,im));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::complex<float>");
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaComplex_std_complex_float__new02(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new_local of class  std::complex<float> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_float__new03_local
static int tolua_luaComplex_std_complex_float__new03_local(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"std::complex<float>",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  float re = ((float)  tolua_tonumber(tolua_S,2,0));
  float im = ((float)  tolua_tonumber(tolua_S,3,0));
  {
   std::complex<float>* tolua_ret = (std::complex<float>*)  Mtolua_new((std::complex<float>)(re,im));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"std::complex<float>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaComplex_std_complex_float__new02_local(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: real of class  std::complex<float> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_float__real00
static int tolua_luaComplex_std_complex_float__real00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const std::complex<float>",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const std::complex<float>* self = (const std::complex<float>*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'real'", NULL);
#endif
  {
   const float tolua_ret = (const float)  self->real();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'real'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: imag of class  std::complex<float> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_float__imag00
static int tolua_luaComplex_std_complex_float__imag00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const std::complex<float>",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const std::complex<float>* self = (const std::complex<float>*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'imag'", NULL);
#endif
  {
   const float tolua_ret = (const float)  self->imag();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'imag'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: real of class  std::complex<float> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_float__real01
static int tolua_luaComplex_std_complex_float__real01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"std::complex<float>",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  std::complex<float>* self = (std::complex<float>*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'real'", NULL);
#endif
  {
   float tolua_ret = (float)  self->real();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaComplex_std_complex_float__real00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: imag of class  std::complex<float> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_float__imag01
static int tolua_luaComplex_std_complex_float__imag01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"std::complex<float>",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  std::complex<float>* self = (std::complex<float>*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'imag'", NULL);
#endif
  {
   float tolua_ret = (float)  self->imag();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaComplex_std_complex_float__imag00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: complex_abs of class  std::complex<float> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_float__abs00
static int tolua_luaComplex_std_complex_float__abs00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"std::complex<float>",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  std::complex<float>* self = (std::complex<float>*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'complex_abs'", NULL);
#endif
  {
   tolua_outside float tolua_ret = (tolua_outside float)  complex_abs(self);
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'abs'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: complex_arg of class  std::complex<float> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_float__arg00
static int tolua_luaComplex_std_complex_float__arg00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"std::complex<float>",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  std::complex<float>* self = (std::complex<float>*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'complex_arg'", NULL);
#endif
  {
   tolua_outside float tolua_ret = (tolua_outside float)  complex_arg(self);
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'arg'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: add of class  std::complex<float> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_float___add00
static int tolua_luaComplex_std_complex_float___add00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"std::complex<float>",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const std::complex<float>",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  std::complex<float>* self = (std::complex<float>*)  tolua_tousertype(tolua_S,1,0);
  const std::complex<float>* tolua_var_17 = ((const std::complex<float>*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'add'", NULL);
#endif
  {
   tolua_outside std::complex<float> tolua_ret = (tolua_outside std::complex<float>)  add(self,*tolua_var_17);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((std::complex<float>)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<float>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::complex<float>));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<float>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function '.add'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: sub of class  std::complex<float> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_float___sub00
static int tolua_luaComplex_std_complex_float___sub00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"std::complex<float>",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const std::complex<float>",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  std::complex<float>* self = (std::complex<float>*)  tolua_tousertype(tolua_S,1,0);
  const std::complex<float>* tolua_var_18 = ((const std::complex<float>*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'sub'", NULL);
#endif
  {
   tolua_outside std::complex<float> tolua_ret = (tolua_outside std::complex<float>)  sub(self,*tolua_var_18);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((std::complex<float>)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<float>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::complex<float>));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<float>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function '.sub'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: mul of class  std::complex<float> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_float___mul00
static int tolua_luaComplex_std_complex_float___mul00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"std::complex<float>",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const std::complex<float>",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  std::complex<float>* self = (std::complex<float>*)  tolua_tousertype(tolua_S,1,0);
  const std::complex<float>* tolua_var_19 = ((const std::complex<float>*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'mul'", NULL);
#endif
  {
   tolua_outside std::complex<float> tolua_ret = (tolua_outside std::complex<float>)  mul(self,*tolua_var_19);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((std::complex<float>)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<float>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::complex<float>));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<float>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function '.mul'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: div of class  std::complex<float> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_float___div00
static int tolua_luaComplex_std_complex_float___div00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"std::complex<float>",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const std::complex<float>",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  std::complex<float>* self = (std::complex<float>*)  tolua_tousertype(tolua_S,1,0);
  const std::complex<float>* tolua_var_20 = ((const std::complex<float>*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'div'", NULL);
#endif
  {
   tolua_outside std::complex<float> tolua_ret = (tolua_outside std::complex<float>)  div(self,*tolua_var_20);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((std::complex<float>)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<float>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::complex<float>));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<float>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function '.div'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: add of class  std::complex<float> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_float___add01
static int tolua_luaComplex_std_complex_float___add01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"std::complex<float>",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  std::complex<float>* self = (std::complex<float>*)  tolua_tousertype(tolua_S,1,0);
  const float tolua_var_21 = ((const float)  tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'add'", NULL);
#endif
  {
   tolua_outside std::complex<float> tolua_ret = (tolua_outside std::complex<float>)  add(self,tolua_var_21);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((std::complex<float>)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<float>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::complex<float>));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<float>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
   tolua_pushnumber(tolua_S,(lua_Number)tolua_var_21);
  }
 }
 return 2;
tolua_lerror:
 return tolua_luaComplex_std_complex_float___add00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: sub of class  std::complex<float> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_float___sub01
static int tolua_luaComplex_std_complex_float___sub01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"std::complex<float>",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  std::complex<float>* self = (std::complex<float>*)  tolua_tousertype(tolua_S,1,0);
  const float tolua_var_22 = ((const float)  tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'sub'", NULL);
#endif
  {
   tolua_outside std::complex<float> tolua_ret = (tolua_outside std::complex<float>)  sub(self,tolua_var_22);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((std::complex<float>)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<float>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::complex<float>));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<float>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
   tolua_pushnumber(tolua_S,(lua_Number)tolua_var_22);
  }
 }
 return 2;
tolua_lerror:
 return tolua_luaComplex_std_complex_float___sub00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: mul of class  std::complex<float> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_float___mul01
static int tolua_luaComplex_std_complex_float___mul01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"std::complex<float>",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  std::complex<float>* self = (std::complex<float>*)  tolua_tousertype(tolua_S,1,0);
  const float tolua_var_23 = ((const float)  tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'mul'", NULL);
#endif
  {
   tolua_outside std::complex<float> tolua_ret = (tolua_outside std::complex<float>)  mul(self,tolua_var_23);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((std::complex<float>)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<float>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::complex<float>));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<float>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
   tolua_pushnumber(tolua_S,(lua_Number)tolua_var_23);
  }
 }
 return 2;
tolua_lerror:
 return tolua_luaComplex_std_complex_float___mul00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: div of class  std::complex<float> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_float___div01
static int tolua_luaComplex_std_complex_float___div01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"std::complex<float>",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  std::complex<float>* self = (std::complex<float>*)  tolua_tousertype(tolua_S,1,0);
  const float tolua_var_24 = ((const float)  tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'div'", NULL);
#endif
  {
   tolua_outside std::complex<float> tolua_ret = (tolua_outside std::complex<float>)  div(self,tolua_var_24);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((std::complex<float>)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<float>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::complex<float>));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<float>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
   tolua_pushnumber(tolua_S,(lua_Number)tolua_var_24);
  }
 }
 return 2;
tolua_lerror:
 return tolua_luaComplex_std_complex_float___div00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: add of class  std::complex<float> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_float___add02
static int tolua_luaComplex_std_complex_float___add02(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"std::complex<float>",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  std::complex<float>* self = (std::complex<float>*)  tolua_tousertype(tolua_S,1,0);
  const float tolua_var_25 = ((const float)  tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'add'", NULL);
#endif
  {
   tolua_outside std::complex<float> tolua_ret = (tolua_outside std::complex<float>)  add(self,tolua_var_25);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((std::complex<float>)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<float>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::complex<float>));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<float>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
   tolua_pushnumber(tolua_S,(lua_Number)tolua_var_25);
  }
 }
 return 2;
tolua_lerror:
 return tolua_luaComplex_std_complex_float___add01(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: sub of class  std::complex<float> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_float___sub02
static int tolua_luaComplex_std_complex_float___sub02(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"std::complex<float>",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  std::complex<float>* self = (std::complex<float>*)  tolua_tousertype(tolua_S,1,0);
  const float tolua_var_26 = ((const float)  tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'sub'", NULL);
#endif
  {
   tolua_outside std::complex<float> tolua_ret = (tolua_outside std::complex<float>)  sub(self,tolua_var_26);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((std::complex<float>)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<float>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::complex<float>));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<float>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
   tolua_pushnumber(tolua_S,(lua_Number)tolua_var_26);
  }
 }
 return 2;
tolua_lerror:
 return tolua_luaComplex_std_complex_float___sub01(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: mul of class  std::complex<float> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_float___mul02
static int tolua_luaComplex_std_complex_float___mul02(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"std::complex<float>",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  std::complex<float>* self = (std::complex<float>*)  tolua_tousertype(tolua_S,1,0);
  const float tolua_var_27 = ((const float)  tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'mul'", NULL);
#endif
  {
   tolua_outside std::complex<float> tolua_ret = (tolua_outside std::complex<float>)  mul(self,tolua_var_27);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((std::complex<float>)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<float>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::complex<float>));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<float>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
   tolua_pushnumber(tolua_S,(lua_Number)tolua_var_27);
  }
 }
 return 2;
tolua_lerror:
 return tolua_luaComplex_std_complex_float___mul01(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: div of class  std::complex<float> */
#ifndef TOLUA_DISABLE_tolua_luaComplex_std_complex_float___div02
static int tolua_luaComplex_std_complex_float___div02(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"std::complex<float>",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  std::complex<float>* self = (std::complex<float>*)  tolua_tousertype(tolua_S,1,0);
  const float tolua_var_28 = ((const float)  tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'div'", NULL);
#endif
  {
   tolua_outside std::complex<float> tolua_ret = (tolua_outside std::complex<float>)  div(self,tolua_var_28);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((std::complex<float>)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<float>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::complex<float>));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<float>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
   tolua_pushnumber(tolua_S,(lua_Number)tolua_var_28);
  }
 }
 return 2;
tolua_lerror:
 return tolua_luaComplex_std_complex_float___div01(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* function: add */
#ifndef TOLUA_DISABLE_tolua_luaComplex_add00
static int tolua_luaComplex_add00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"std::complex<double>",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  double tolua_var_29 = ((double)  tolua_tonumber(tolua_S,1,0));
  std::complex<double> tolua_var_30 = *((std::complex<double>*)  tolua_tousertype(tolua_S,2,0));
  {
   std::complex<double> tolua_ret = (std::complex<double>)  add(tolua_var_29,tolua_var_30);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((std::complex<double>)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<double>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(std::complex<double>));
     tolua_pushusertype(tolua_S,tolua_obj,"std::complex<double>");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'add'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* Open function */
TOLUA_API int tolua_luaComplex_open (lua_State* tolua_S)
{
 tolua_open(tolua_S);
 tolua_reg_types(tolua_S);
 tolua_module(tolua_S,NULL,0);
 tolua_beginmodule(tolua_S,NULL);
  tolua_module(tolua_S,"std",0);
  tolua_beginmodule(tolua_S,"std");
   #ifdef __cplusplus
   tolua_cclass(tolua_S,"complex","std::complex<double>","",tolua_collect_std__complex_double_);
   #else
   tolua_cclass(tolua_S,"complex","std::complex<double>","",NULL);
   #endif
   tolua_beginmodule(tolua_S,"complex");
    tolua_function(tolua_S,"new",tolua_luaComplex_std_complex_new00);
    tolua_function(tolua_S,"new_local",tolua_luaComplex_std_complex_new00_local);
    tolua_function(tolua_S,".call",tolua_luaComplex_std_complex_new00_local);
    tolua_function(tolua_S,"new",tolua_luaComplex_std_complex_new01);
    tolua_function(tolua_S,"new_local",tolua_luaComplex_std_complex_new01_local);
    tolua_function(tolua_S,".call",tolua_luaComplex_std_complex_new01_local);
    tolua_function(tolua_S,"new",tolua_luaComplex_std_complex_new02);
    tolua_function(tolua_S,"new_local",tolua_luaComplex_std_complex_new02_local);
    tolua_function(tolua_S,".call",tolua_luaComplex_std_complex_new02_local);
    tolua_function(tolua_S,"new",tolua_luaComplex_std_complex_new03);
    tolua_function(tolua_S,"new_local",tolua_luaComplex_std_complex_new03_local);
    tolua_function(tolua_S,".call",tolua_luaComplex_std_complex_new03_local);
    tolua_function(tolua_S,"real",tolua_luaComplex_std_complex_real00);
    tolua_function(tolua_S,"imag",tolua_luaComplex_std_complex_imag00);
    tolua_function(tolua_S,"real",tolua_luaComplex_std_complex_real01);
    tolua_function(tolua_S,"imag",tolua_luaComplex_std_complex_imag01);
    tolua_function(tolua_S,"abs",tolua_luaComplex_std_complex_abs00);
    tolua_function(tolua_S,"arg",tolua_luaComplex_std_complex_arg00);
    tolua_function(tolua_S,".add",tolua_luaComplex_std_complex__add00);
    tolua_function(tolua_S,".sub",tolua_luaComplex_std_complex__sub00);
    tolua_function(tolua_S,".mul",tolua_luaComplex_std_complex__mul00);
    tolua_function(tolua_S,".div",tolua_luaComplex_std_complex__div00);
    tolua_function(tolua_S,".add",tolua_luaComplex_std_complex__add01);
    tolua_function(tolua_S,".sub",tolua_luaComplex_std_complex__sub01);
    tolua_function(tolua_S,".mul",tolua_luaComplex_std_complex__mul01);
    tolua_function(tolua_S,".div",tolua_luaComplex_std_complex__div01);
    tolua_function(tolua_S,".add",tolua_luaComplex_std_complex__add02);
    tolua_function(tolua_S,".sub",tolua_luaComplex_std_complex__sub02);
    tolua_function(tolua_S,".mul",tolua_luaComplex_std_complex__mul02);
    tolua_function(tolua_S,".div",tolua_luaComplex_std_complex__div02);
   tolua_endmodule(tolua_S);
   #ifdef __cplusplus
   tolua_cclass(tolua_S,"complex_float_","std::complex<float>","",tolua_collect_std__complex_float_);
   #else
   tolua_cclass(tolua_S,"complex_float_","std::complex<float>","",NULL);
   #endif
   tolua_beginmodule(tolua_S,"complex_float_");
    tolua_function(tolua_S,"new",tolua_luaComplex_std_complex_float__new00);
    tolua_function(tolua_S,"new_local",tolua_luaComplex_std_complex_float__new00_local);
    tolua_function(tolua_S,".call",tolua_luaComplex_std_complex_float__new00_local);
    tolua_function(tolua_S,"new",tolua_luaComplex_std_complex_float__new01);
    tolua_function(tolua_S,"new_local",tolua_luaComplex_std_complex_float__new01_local);
    tolua_function(tolua_S,".call",tolua_luaComplex_std_complex_float__new01_local);
    tolua_function(tolua_S,"new",tolua_luaComplex_std_complex_float__new02);
    tolua_function(tolua_S,"new_local",tolua_luaComplex_std_complex_float__new02_local);
    tolua_function(tolua_S,".call",tolua_luaComplex_std_complex_float__new02_local);
    tolua_function(tolua_S,"new",tolua_luaComplex_std_complex_float__new03);
    tolua_function(tolua_S,"new_local",tolua_luaComplex_std_complex_float__new03_local);
    tolua_function(tolua_S,".call",tolua_luaComplex_std_complex_float__new03_local);
    tolua_function(tolua_S,"real",tolua_luaComplex_std_complex_float__real00);
    tolua_function(tolua_S,"imag",tolua_luaComplex_std_complex_float__imag00);
    tolua_function(tolua_S,"real",tolua_luaComplex_std_complex_float__real01);
    tolua_function(tolua_S,"imag",tolua_luaComplex_std_complex_float__imag01);
    tolua_function(tolua_S,"abs",tolua_luaComplex_std_complex_float__abs00);
    tolua_function(tolua_S,"arg",tolua_luaComplex_std_complex_float__arg00);
    tolua_function(tolua_S,".add",tolua_luaComplex_std_complex_float___add00);
    tolua_function(tolua_S,".sub",tolua_luaComplex_std_complex_float___sub00);
    tolua_function(tolua_S,".mul",tolua_luaComplex_std_complex_float___mul00);
    tolua_function(tolua_S,".div",tolua_luaComplex_std_complex_float___div00);
    tolua_function(tolua_S,".add",tolua_luaComplex_std_complex_float___add01);
    tolua_function(tolua_S,".sub",tolua_luaComplex_std_complex_float___sub01);
    tolua_function(tolua_S,".mul",tolua_luaComplex_std_complex_float___mul01);
    tolua_function(tolua_S,".div",tolua_luaComplex_std_complex_float___div01);
    tolua_function(tolua_S,".add",tolua_luaComplex_std_complex_float___add02);
    tolua_function(tolua_S,".sub",tolua_luaComplex_std_complex_float___sub02);
    tolua_function(tolua_S,".mul",tolua_luaComplex_std_complex_float___mul02);
    tolua_function(tolua_S,".div",tolua_luaComplex_std_complex_float___div02);
   tolua_endmodule(tolua_S);

   { /* begin embedded lua code */
    int top = lua_gettop(tolua_S);
    static const unsigned char B[] = {
    10,102,117,110, 99,116,105,111,110, 32, 99,111,109,112,108,
     101,120, 32, 40,115,101,108,102, 41, 10,108,111, 99, 97,108,
      32, 99,111, 98,106, 32, 61, 32,115,116,100, 46, 99,111,109,
     112,108,101,120, 58,110,101,119, 40,115,101,108,102, 46,114,
     101, 32,111,114, 32, 48, 44, 32,115,101,108,102, 46,105,109,
      32,111,114, 32, 48, 41, 10,116,111,108,117, 97, 46,116, 97,
     107,101,111,119,110,101,114,115,104,105,112, 40, 99,111, 98,
     106, 41, 10,114,101,116,117,114,110, 32, 99,111, 98,106, 10,
     101,110,100, 45, 45, 45, 45, 45,32
    };
    tolua_dobuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code 1");
    lua_settop(tolua_S, top);
   } /* end of embedded lua code */

  tolua_endmodule(tolua_S);
  tolua_function(tolua_S,"add",tolua_luaComplex_add00);
 tolua_endmodule(tolua_S);
 return 1;
}


#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501
 TOLUA_API int luaopen_luaComplex (lua_State* tolua_S) {
 return tolua_luaComplex_open(tolua_S);
};
#endif

